package cn.yunhe.service;


import cn.yunhe.entity.Field;
import cn.yunhe.entity.Question;
import com.github.pagehelper.Page;

import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface QuestionService {


    boolean addQuestion(Question question);
    boolean upd(Question question);
    /**
     * 删除试题知识点中间表数据
     */
    boolean delQuestionPoint(Integer questionId);
    /**
     * 删除试题知识点中间表数据
     */
    boolean addQuestionPoint(Integer questionId, Integer pointId);

    /**
     * 搜索查询
     * @param question
     * @return
     */

    List<Question> queryQuestion(Question question);

    /**
     * 查询结果总数
     * @param question
     * @return
     */

    Integer queryQuestionCount(Question question);

    /**
     * 分页查询
     * @param question
     * @param pageNum
     * @return
     */
    Page queryQuestion(Question question, Integer pageNum);
    /**
     * 批量查询试题详情
     * @return 试题集
     */
    List<Question> queryQuestionByList(List<Question> list);

    /**
     *查询试题详情
     * @return 试题
     */
    Question queryQuestionById(Integer id);

    /**
     * 查询所有题
     * @return
     */
    int getQuestionCount();

    /**
     * 获取每科题目数目
     * @return questionCount
     * 郭瀚钰
     */
    List<Field> getQuestionCountGroupByFieldId();
}
